package com.cssl.pojo;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Document("users")
@TableName("users")
@Data
public class Users implements Serializable {

	@MongoId
	@TableId
	private Integer id;
	private String username;
	private String password;
	@Field("isdel")
	@TableLogic(value = "0",delval = "1")
	private int isdelete;

	@Transient
	@TableField(exist = false)
	private Classes classes = new Classes();

	@TableField(exist = false)
	private List<Classes> list = new ArrayList<>();
}
